<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container {
            height: 400px;
            width: 100%;
            border-left: 3px solid red;
            border-top: 3px solid red;
        }
        .nav {
            height: 100%;
            width: 100px;
            float: left;
            box-sizing: border-box;
        }
        .nav-item {
            height: 25%;
            width: 100%;
            text-align: center;
            /* 文字纵向居中 start */
            display: flex;
            flex-direction: column;
            justify-content: center;
            /* 文字纵向居中 end */
            box-sizing: border-box;
            border-right: 3px solid red;
            border-bottom: 3px solid red;
        }
        .nav-item:hover {
            background-color: red;
        }
        .intro {
            height: 100%;
            /* calculate 计算 */
            width: calc(100% - 100px);
            border-right: 3px solid red;
            border-bottom: 3px solid red;
            float: left;
            box-sizing: border-box;
        }
    </style>
</head>
<body>

    <div class="container">
        <div class="nav">
            <div class="nav-item">asdasd</div>
            <div class="nav-item">asdsad</div>
            <div class="nav-item">asdasd</div>
            <div class="nav-item">dqr34e</div>
        </div>
        <div class="intro"></div>
    </div>

    <script src="./jq.js"></script>

    <script>

        const data = [
            {
                color: 'red',
                title: '女靴',
            },
            {
                color: 'aqua',
                title: '雪地靴',
            },
            {
                color: 'pink',
                title: '冬裙',
            },
            {
                color: 'blue',
                title: '呢大衣',
            },
        ];

        $('.nav-item').on('mouseover', function () {
            // 拿索引
            const index = $(this).index();
            $('.intro').css('background', data[index].color);
        });

    </script>
</body>
</html>